{% extends "base.html" %}
{% comment %}

Login page to authenticate users.

{% endcomment %}

{% block head %}
    <title>Django Consultants | Login</title>
{% endblock %}

{% block body %}
    <header>
        <h1>Django Consultants</h1>
        <h2>Login Page</h2>
    </header>

    <section>
        {% if form.errors %}
            <p>Your username and password didn't match, please try again.</p>
        {% endif %}

        <form method="post" action=".">
            <p>
                <label for="id_username">Username:</label>
                {{ form.username }}
            </p>
            <p>
                <label for="id_password">Password:</label>
                {{ form.password }}
            </p>
            {% if next %}
                <input type="hidden" name="next" value="{{ next }}" />
            {% else %}
                <input type="hidden" name="next" value="/portal/" />
            {% endif %}
            <input type="submit" value="login" />
        </form>
    </section>
{% endblock %}